﻿// labelUi.h : labelUi DLL 的主头文件
//

#pragma once

#include <afxwin.h>
#include <json/ossJson.h>
#include "labelDriverDef.hpp"

#define CREATE_UI_MSG				(WM_USER + 9)		//加载界面,wParam参考CreateUiParam
#define LABEL_UI_MSG_MAX			(WM_USER + 1000)

//界面状态
typedef enum{
	UI_NONE_STATUS,
	UI_CREATE_STATUS,
	UI_DESTORY_STATUS,
}UiStatus;

class LabelUiBase;


/**
 *		创建UI携带的参数
 */
typedef struct CreateUiParam_tag{
	LabelUiBase*	hParentUi;
	OssJson			createUiParam;
}CreateUiParam;

typedef struct SubjectData_tag
{
	OssListNode	node;
	OssJson		subjectData;
}SubjectData;

/**
 *		处理UI请求
 */
typedef BOOL (*HandleUiRequestFun)(LdDataType tDataType, LabelUiBase* pUi, OssJson& requestParam, DWORD dwMsgId, LPVOID lpcontext);

/**
 *		注册UI数据
 */
typedef BOOL (*RegisterUiListenDataFun)(LPVOID lpcontext, LdDataType tDataType,DWORD dwMsgId, LabelUiBase*pUi);

/**
    *      撤销监听数据
    */
typedef BOOL (*RevokeUiListenDataFun)(LPVOID lpcontext, LdDataType tDataType,DWORD dwMsgId, LabelUiBase*pUi);

